package com.joysuch.wwyt.risk.enums;

/**
 * @Author ZhangDong
 * @Date 2021/1/11 14:30
 */
public enum RiskPointStatus {

    WAIT_COMMIT((byte)0, "待提交"),
    AUDIT_FAIL((byte)1, "审核不通过"),
    AUDIT_ONGOING((byte)2, "审核中"),
    AUDIT_SUCCESS((byte)3, "审核通过");

    private byte index;
    private String status;

    public static String getStatus(byte index) {
        RiskPointStatus[] values = RiskPointStatus.values();
        for (RiskPointStatus value : values) {
            if (value.index == index) {
                return value.status;
            }
        }
        return null;
    }

    RiskPointStatus(byte index, String status) {
        this.index = index;
        this.status = status;
    }

    public byte getIndex() {
        return index;
    }

    public void setIndex(byte index) {
        this.index = index;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

}
